From b8694e6049c6a688b8971f2a05ab187591a87626 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 17 Jun 2010 00:13:43 +0000 Subject: [PATCH] Trim read strings in EXIF reader as Panasonic DMC-TZ10 trails spaces. --- exif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exif.c b/exif.c index 42dd908db..29d0004c2 100644 --- a/exif.c +++ b/exif.c @@ -209,7 +209,10 @@ exif_time_str(const time_t time) static char * exif_read_str(exif_tag_t *tag) { - return xstrndup((char *)tag->data, tag->size); + // Panasonic DMC-TZ10 stores datum with trailing spaces. + char *buf = xstrndup((char *)tag->data, tag->size); + rtrim (buf); + return buf; } static double -- 2.30.2